//
//  ViewController.m
//  PhotoPicker
//
//  Created by 火爆私厨 on 2016/12/12.
//  Copyright © 2016年 参加科技. All rights reserved.
//

#import "ViewController.h"
#import "AJPhotoPickerViewController.h"


#import "CCPTakePicturesController.h"
@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (IBAction)pickerClick:(id)sender {
    AJPhotoPickerViewController *picker = [[AJPhotoPickerViewController alloc] init];
    picker.assetsFilter = [ALAssetsFilter allPhotos];
    picker.showEmptyGroups = YES;
    picker.isCanCut = YES;
    picker.selectionFilter = [NSPredicate predicateWithBlock:^BOOL(id evaluatedObject, NSDictionary *bindings) {
        return YES;
    }];
    
    picker.iconImage = ^(UIImage *iconImage){
        self.myImgView.image = iconImage;
    };
    
    [self presentViewController:picker animated:YES completion:nil];

}

//-(void)viewDidAppear:(BOOL)animated{
//    CCPTakePicturesController *ccpTake = [[CCPTakePicturesController alloc] init];
//    
//    [self presentViewController:ccpTake animated:YES completion:nil];
//}

@end
